package cn.gan.loveofsoul.entity.vo;

import cn.gan.loveofsoul.config.LocalDateTimeDeserializer;
import cn.gan.loveofsoul.config.LocalDateTimeSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author ganwh
 * @since 2023-10-26
 */
@Getter
@Setter
@ToString
public class CommemorateDayVO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 纪念日ID
     */
    private Integer id;

    /**
     * 情侣关系ID
     */
    @NotNull(message = "未绑定情侣关系")
    private Integer relationshipId;

    /**
     * 纪念日类型
     */
    private String type;

    /**
     * 排序
     */
    private Integer order;

    /**
     * 纪念时间
     */
    @JSONField(serializeUsing = LocalDateTimeSerializer.class, deserializeUsing = LocalDateTimeDeserializer.class)
    @NotNull(message = "请选择纪念日时间")
    private LocalDateTime recordTime;

    /**
     * 备注
     */
    @NotBlank(message = "请输入纪念日名称")
    @Length(max = 10, message = "纪念日名称最多可输入10个字")
    private String remark;

    private String background;

    Integer userId;
}
